﻿/*
 * Copyright © 2025−2026 WEI.ZHOU (Willis) (Chengdu). All rights reserved.
 *
 * THIS SOURCE CODE IS PROPRIETARY AND CONFIDENTIAL.
 * It is the exclusive property of WEI.ZHOU (Willis) and may not be
 * used, copied, distributed, or disclosed outside of WEI.ZHOU (Willis)
 * without express written permission.
 *
 * This code is provided to WEI.ZHOU (Willis) under a limited,
 * non-transferable internal license, and is for use only with the author's
 * approved purposes. No external license is granted or implied.
 *
 * Any unauthorized use, reproduction, or distribution is strictly prohibited
 * and may result in severe civil and criminal penalties.
 */

using Aore.ConfigManager;
using Aore.ConfigManager.Providers;
using Aore.Core.BaseModels;

namespace Aore.Core;

public static class ConfigManagement
{
  /// <summary>
  /// 配置管理
  /// </summary>
  public static readonly AppSettingModel AppSetting;

  static ConfigManagement()
  {
    AppSettingManager manager = new AppSettingManager()
      .Add(new JsonConfigProvider("appsettings.json"))
      .Load();

    AppSetting = manager.ConvertTo<AppSettingModel>();
  }
}